<me:UIWBBEW x:Class="WPFExcelReport.TJLRWBB13"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                     x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIWBBEW.Resources>
        <CollectionViewSource  x:Key="vwMaster" />
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TRIMGB2312Convert8859P1 x:Key="tugb"/>
    </me:UIWBBEW.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0">
            <WrapPanel Height="34">
               <Label Width="Auto"  VerticalAlignment="Center" Content="{Binding Source={Localization:Translate Word=任务书号：}}" FontSize="18" />
                <TextBox Text="" Name="txtFART"  Width="128" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink"  
                         CharacterCasing="Upper" MaxLength="20" FontSize="18"   Foreground="#FF141111" />
                <Label Content="{Binding Source={Localization:Translate Word=检验日期从}}"   HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"  Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0"  FontSize="16"   Panel.ZIndex="4" 
                            Text="{Binding DTSTART,ElementName=TV}" SelectedDateChanged ="DTSTART_SelectedDateChanged"  />
                <Label Content="{Binding Source={Localization:Translate Word=到}}" Height="28" HorizontalAlignment="Left" Margin="10,0,0,0"   Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,0,0,0"   VerticalAlignment="Center" FontSize="16"  Panel.ZIndex="5"
                                  Text="{Binding DTEND,ElementName=TV}" SelectedDateChanged ="DTEND_SelectedDateChanged" />
                <Button Content="{Binding Source={Localization:Translate Word=查询}}" Height="33" Margin="10,0,0,0" FontSize="18"  Width="96" Panel.ZIndex="9"
                        Click="QueryCommand"/>
                <Button Content="{Binding Source={Localization:Translate Word=导出}}" Height="33" Margin="10,0,0,0" FontSize="18"  Width="100" Panel.ZIndex="10"
                    Click="PrintCommand"   />
            </WrapPanel>
        </StackPanel>
        <Grid Grid.Row="1" Grid.Column="0">   
        <DataGrid  VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"
                   Name="dlgMaster"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                    >
            <DataGrid.Columns>
                    <!--WBEWMANDANT	TYP	WBEWART	WBEWFARBE	WABEZ	DENSITY	WTGWBBRT	DES	QTY	WARP	WEFT-->
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=织机类型}}" Binding="{Binding TYP,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=任务书}}" Binding="{Binding WBEWART}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=花号}}" Binding="{Binding WBEWFARBE}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=产品名称}}" Binding="{Binding WABEZ,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=经纬密}}" Binding="{Binding DENSITY}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=纱支}}" Binding="{Binding DES,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=数量}}" Binding="{Binding QTY}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=百米经纱用量}}" Binding="{Binding WARP,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=百米纬纱用量}}" Binding="{Binding WEFT,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid>
        </Grid>
        <!--ex:TPage  Grid.Row="2" Visibility="{Binding IsPage,Converter={StaticResource bv}}"/-->
    </Grid>
</me:UIWBBEW> 
 
